home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Sep 90 / MacApp.Tech$ 9⁄14⁄90 / 1952-ModalDialog problem-Sep90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.3 KB  |  69 lines  |  [TEXT/GEOL]

  1. Item    7371757                         8-Sept-90        23:01DST
  2.  
  3. From:   UK0392                          EHN & DIJ Oakley,IDV
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    ModalDialog problem
  8.  
  9. Friends,
  10.  
  11. Just before he went on vacation, Keith Rollin passed on two notes from the
  12. field, including:
  13.  
  14. "1) There are two modal dialogs with EditText fields.  The field selected upon
  15. opening the dialogs was locked (would accept no input from the keyboard) and
  16. required going to another field and then returning to make an entry .  This did
  17. not happen with MA 2.0.  The probalem was fixed by placing the
  18. SelectEditText('name',True); call after, rather than before, opening the window
  19. containing the dialog."
  20.  
  21. Now, I have just rebuilt (and started shipping new betas of) all my
  22. applications using MA2.02, and have found that this problem appears to affect
  23. *all* such instances of EditText fields which are selected when opening a
  24. dialog.  Now, if the dialog is modeless, you have a minor inconvenience.
  25. However, if you use the following code, the cookbook way of opening a modal
  26. dialog, then there appears to be no workaround:
  27.  
  28.    PROCEDURE DoInfo;
  29.    VAR
  30.    aWindow:TWindow;
  31.    aInfoView:  TInfoView;
  32.    aView:  TView;
  33.    dismisser:  IDType;
  34.    BEGIN
  35.    aWindow := NewTemplateWindow(6005, NIL);
  36.    IF aWindow <> NIL THEN
  37.    BEGIN
  38.    aInfoView := TInfoView(aWindow.FindSubView('DLOG'));
  39.    IF aInfoView <> NIL THEN
  40.    BEGIN
  41.    aInfoView.IInfoView(SELF);
  42.    aInfoView.StuffValues;
  43.    aInfoView.SelectEditText('in01', TRUE); {has to go here!!!}
  44.    dismisser := aInfoView.PoseModally;
  45.    fChangeCount := fChangeCount + 1;
  46.    END
  47.    {$IFC qDebug}
  48.    ELSE
  49.    ProgramBreak('MakeTemplateViews: Unable to find view.')
  50.    {$ENDC}
  51.    ;
  52.    aWindow.Close;
  53.    END;
  54.    END;
  55.  
  56. I have tried a quick (hocus pocus) focus prior to trying SelectEditText, to no
  57. avail, nor can I see anything obvious in the MacApp 2.02 source.  Although I
  58. will obviously continue to search for a solution (I have one dialog in which
  59. there is only 1 EditText item, which prevents the user from entering anything
  60. if I use the above code to try to select it at the opening of the dialog!!),
  61. all suggestions will be greatly appreciated.
  62.  
  63. I am sorry if this has already been raised & solved, but I cannot find a recent
  64. link on it.
  65.  
  66. Regards,
  67. Howard.
  68.  
  69.